/**
 * Created by xmfang on 2015/1/15.
 */
var config = require('../conf/config');
var constant = config.constant;
var logTransaction = require('./commentAndLog');

exports.recordAccept = function (memberId, scheduleId) {
    //var scheduleTypeDescription = scheduleType == constant.scheduleType.MEETING ? '会议' : '任务';
    //var logContent = '接受了' + scheduleTypeDescription + '邀请';
    logTransaction.createLog(scheduleId, memberId, constant.actionType.ACCEPT, '');
};

exports.recordRefuse = function (memberId, scheduleId, reason) {
    //var scheduleTypeDescription = scheduleType == constant.scheduleType.MEETING ? '会议' : '任务';
    //var logContent = '拒绝了' + scheduleTypeDescription + '邀请';
    logTransaction.createLog(scheduleId, memberId, constant.actionType.REFUSE, reason);
};

exports.recordRestartTask = function (memberId, scheduleId) {
    var logContent = '重启了任务';
    logTransaction.createLog(scheduleId, memberId, constant.actionType.RESTART, logContent);
};

exports.recordCompleteTask = function (memberId, scheduleId, completeContent) {
    //var logContent = '完成了任务';
    logTransaction.createLog(scheduleId, memberId, constant.actionType.COMPLETE, completeContent);
};
